﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="AtendenteCadastro.aspx.cs" Inherits="PopPromotoraCallCenter.Admin.AtendenteCadastro" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="btnGravar" />
        </Triggers>
        <ContentTemplate>
            <ul class="ul">
                <li><span class="titulo_pg">Atendente</span></li>
            </ul>
            <asp:HiddenField ID="hfAtendenteId" runat="server" Value="0" />
            <asp:MultiView ID="mvAtendente" runat="server" ActiveViewIndex="0">
                <asp:View runat="server" ID="View1">
                    <asp:Button ID="btnNovo" runat="server" Text="Novo atendente" CssClass="BotaoForm" onclick="btnNovo_Click" />
                    <br /><asp:Label ID="lblMsgGrid" runat="server" Text="" CssClass="msgErro"></asp:Label><br />
                    <asp:GridView ID="gvAtendente" runat="server" 
                        DataKeyNames="idAtendente,fgAtivo" AutoGenerateColumns="False" CellPadding="4" 
                        ForeColor="#333333" GridLines="None" 
                        onrowcommand="gvAtendente_RowCommand" 
                        onrowdatabound="gvAtendente_RowDataBound" CssClass="labelCampo">
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:BoundField HeaderText="Nome" DataField="NomeAtendente" />
                            <asp:BoundField HeaderText="Status" DataField="fgAtivo" />
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Button ID="btnEditar" runat="server" CssClass="BotaoForm" CommandArgument='<%# Eval("idAtendente") %>' CommandName="editar" Text="Editar" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Button ID="btnStatus" runat="server" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>' CommandName="status" Text="Desabilitar" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Button ID="btnExcluir" runat="server" CssClass="BotaoForm" CommandArgument='<%# Eval("idAtendente") %>' CommandName="excluir" Text="Excluir" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#999999" />
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                    </asp:GridView>
                </asp:View>
                <asp:View runat="server" ID="View2">
                    <div>
                        <ul class="ul" style=" width: 460px;">
                            <li>
                                <ul class="ul itemrow">
                                    <li class="li DescCampoForm" style="width: 160px;">Nome atendente</li>
                                    <li><asp:TextBox ID="txtNomeAtendente" CssClass="CampoForm" Width="250" MaxLength="50" runat="server"></asp:TextBox></li>
                                </ul>
                            </li>
                            <li class="marginTopField">
                                <ul class="ul">
                                    <li class="li DescCampoForm" style="width: 120px;">Ativo</li>
                                    <li><asp:CheckBox ID="cbAtivo" runat="server" /></li>
                                </ul>
                            </li>
                            <li class="marginTopField">
                                <ul class="ul">
                                    <li class="li" style="width: 120px;"></li>
                                    <li>
                                        <asp:Button ID="btnGravar" CssClass="BotaoForm" runat="server" Text="Gravar" onclick="btnGravar_Click" />&nbsp;&nbsp;
                                        <asp:Button ID="btnVoltar" CssClass="BotaoForm" runat="server" Text="Voltar" onclick="btnVoltar_Click" />
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </asp:View>
            </asp:MultiView>
            </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>